package jsyf.oa.entity.system;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by Maqiuqiu on 2018/8/2.
 */
@Entity
@Table(name = "t_sys_region_achivements", schema = "oa", catalog = "")
public class RegionAchivementsEntity extends BaseEntity {

    private String userId;
    private String areaId;
    private String beginMonth;
    private String middleMonth;
    private String endMonth;
    private Integer saleTargetNum;
    private Integer saleFinishNum;
    private String createUserId;

    private String bigRegionalManagerId;
    private String regionalDirectorId;
    private String directorOfSalesId;
    private String generalManagerId;


    public String getBigRegionalManagerId() {
        return bigRegionalManagerId;
    }

    public void setBigRegionalManagerId(String bigRegionalManagerId) {
        this.bigRegionalManagerId = bigRegionalManagerId;
    }

    public String getRegionalDirectorId() {
        return regionalDirectorId;
    }

    public void setRegionalDirectorId(String regionalDirectorId) {
        this.regionalDirectorId = regionalDirectorId;
    }

    public String getDirectorOfSalesId() {
        return directorOfSalesId;
    }

    public void setDirectorOfSalesId(String directorOfSalesId) {
        this.directorOfSalesId = directorOfSalesId;
    }

    public String getGeneralManagerId() {
        return generalManagerId;
    }

    public void setGeneralManagerId(String generalManagerId) {
        this.generalManagerId = generalManagerId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getAreaId() {
        return areaId;
    }

    public void setAreaId(String areaId) {
        this.areaId = areaId;
    }

    public String getBeginMonth() {
        return beginMonth;
    }

    public void setBeginMonth(String beginMonth) {
        this.beginMonth = beginMonth;
    }

    public String getMiddleMonth() {
        return middleMonth;
    }

    public void setMiddleMonth(String middleMonth) {
        this.middleMonth = middleMonth;
    }

    public String getEndMonth() {
        return endMonth;
    }

    public void setEndMonth(String endMonth) {
        this.endMonth = endMonth;
    }

    public Integer getSaleTargetNum() {
        return saleTargetNum;
    }

    public void setSaleTargetNum(Integer saleTargetNum) {
        this.saleTargetNum = saleTargetNum;
    }

    public Integer getSaleFinishNum() {
        return saleFinishNum;
    }

    public void setSaleFinishNum(Integer saleFinishNum) {
        this.saleFinishNum = saleFinishNum;
    }

    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Override
    public JSONObject getJSONObject() {
        JSONObject obj = new JSONObject();
        obj.put("ID", getId());
        obj.put("USER_ID", getUserId());
        obj.put("AREA_ID", getAreaId());
        obj.put("BEGIN_MONTH", getBeginMonth());
        obj.put("MIDDLE_MONTH", getMiddleMonth());
        obj.put("END_MONTH", getEndMonth());
        obj.put("SALE_TARGET_NUM", getSaleTargetNum());
        obj.put("SALE_FINISH_NUM", getSaleFinishNum());
        obj.put("CREATE_TIME", getCreateTime());
        obj.put("CREATE_USER_ID", getCreateUserId());
        obj.put("BIG_REGIONAL_MANAGER_ID", getBigRegionalManagerId());
        obj.put("REGIONAL_DIRECTOR_ID", getRegionalDirectorId());
        obj.put("DIRECTOR_OF_SALES_ID", getDirectorOfSalesId());
        obj.put("GENERAL_MANAGER_ID", getGeneralManagerId());
        return obj;
    }

    @Override
    public String getTableName() {
        return "t_sys_region_achivements";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("USER_ID", "userId");
        obj.put("AREA_ID", "areaId");
        obj.put("BEGIN_MONTH", "beginMonth");
        obj.put("MIDDLE_MONTH", "middleMonth");
        obj.put("END_MONTH", "endMonth");
        obj.put("SALE_TARGET_NUM", "saleTargetNum");
        obj.put("SALE_FINISH_NUM", "saleFinishNum");
        obj.put("CREATE_TIME", "createTime");
        obj.put("CREATE_USER_ID", "createUserId");
        obj.put("BIG_REGIONAL_MANAGER_ID", "bigRegionalManagerId");
        obj.put("REGIONAL_DIRECTOR_ID", "regionalDirectorId");
        obj.put("DIRECTOR_OF_SALES_ID", "directorOfSalesId");
        obj.put("GENERAL_MANAGER_ID", "generalManagerId");
        return obj;
    }
}
